<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)	
	Try
	Dim myConnection As New SqlConnection()
    	myConnection.ConnectionString = _
	"server=localhost;" & _
	"UID=sa;PWD=aido;database=intershop;" & _
	"Connect Timeout=30"
    	myConnection.Open()
	Response.Write("State of SqlConnection is: ") 
	Response.Write(myConnection.State)	
	Catch objError As Exception
		Response.Write("<b>* Error.Message</b>: " & _
		objError.Message & "<p />")
		Response.Write("<b>* Error.Error</b>: " & _
		objError.Errors & "<p />")
		If myConnection.State = ConnectionState.Open Then
			myConnection.Close()
		end if
	End Try
End Sub
</script>	
